
const { join } = require('path')

/**
 * 对上下文做一个初始化
 * @param {上下文} context 
 */
module.exports = function(context){
    context.indexes = { globe: {} }
    context.writeOutTheArea = []
    context.classes = {
        controller:{},
        service: {},
        mapper: {},
        serviceInter: {},
    }
    context.step1 = {
        
    }
    initBaseIndex(context.indexes.globe,context.config);
}


function initBaseIndex(globeIndex, {globeConfig:{globe}}){
    globeIndex.front = {
        viewDir: join(globe.dist.front.dir,"src/views"),
        apiDir: join(globe.dist.front.dir,"src/api")
    }
}